package org.candan.spider.task;

import org.candan.spider.task.db.TaskDBParse;
import org.candan.spider.task.xml.PlanXMLParse;
import org.candan.spider.task.xml.TaskXMLParse;


public class Adapter {

	public static String XML_STRATEGY="XML" ;//strategy
	public static String DB_STRATEGY="DB" ;//strategy
	
	
	public static  ITaskService instanceTask(String drivername){
		if(XML_STRATEGY.equals(drivername)){
			return new TaskXMLParse();
		}else if(DB_STRATEGY.equals(drivername)){
			return new TaskDBParse();
		}
		 return null;
	}
	
	public static  IPlanService instancePlan(String drivername){
		if(XML_STRATEGY.equals(drivername)){
			return new PlanXMLParse();
		}else if(DB_STRATEGY.equals(drivername)){
			return null;
		}
		 return null;
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
